﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Main
{
    public partial class Form1 : RibbonForm
    {
        #region "[danh sách các biến toàn cục]"
        
        #endregion

        #region "[Khởi tạo mặc định]"
        /// <summary>
        /// Khởi tạo mặc định
        /// </summary>
        public Form1()
        {
            InitializeComponent();
            ChangeTheme();
        }
        #endregion

        #region "[thay doi nen]"
        /// <summary>
        /// thay doi nen
        /// </summary>
        private void ChangeTheme()
        {
            Theme.ColorTable = new MyCoolThemeSkin();
            ribbon1.Refresh();
            this.Refresh(); 
        }
        #endregion

        #region "[chức năng đăng nhập]"
        /// <summary>
        /// chức năng đăng nhập
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnDangNhap_Click(object sender, EventArgs e)
        {
            frm_DangNhap frm = new frm_DangNhap();
            frm.ShowDialog();
        }
        #endregion

        #region "[chuc nang nhap kho]"
        /// <summary>
        /// chuc nang nhap kho
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnNhapKho_Click(object sender, EventArgs e)
        {
            try
            {
                uc.uc_NhapKho uc = new uc.uc_NhapKho();
                uc.Dock = DockStyle.Fill;
               
                this.pnMain.Controls.Clear();
                pnMain.Dock = DockStyle.Fill;
                pnMain.Controls.Add(uc);
            }
            catch { }
        }
        #endregion

        #region "[chuc nang ban hang]"
        /// <summary>
        /// chuc nang ban hang
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnBanHang_Click(object sender, EventArgs e)
        {
            uc.uc_Ban_Hang uc = new uc.uc_Ban_Hang();
            uc.Dock = DockStyle.Fill;
            pnMain.Controls.Clear();
            pnMain.Controls.Add(uc);
        }
        #endregion

        #region "[chuc nang khách hàng]"
        /// <summary>
        /// chuc nang khách hàng
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnKhachHang_Click(object sender, EventArgs e)
        {
            uc.uc_Khach_Hang uc = new uc.uc_Khach_Hang();
            uc.Dock = DockStyle.Fill;
            pnMain.Controls.Clear();
            pnMain.Controls.Add(uc);
        }
        #endregion

        #region "[chuc nang thong ke]"
        /// <summary>
        /// chuc nang thong ke
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnThongKe_Click(object sender, EventArgs e)
        {
            uc.uc_ThongKe uc = new uc.uc_ThongKe();
            uc.Dock = DockStyle.Fill;
            pnMain.Controls.Clear();
            pnMain.Controls.Add(uc);
        }
        #endregion
    }
}
